package com.song.web.config;

import entity.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @Author 宋伟宁
 * @Date 2024/1/5
 * @Version 1.0
 **/
@RestControllerAdvice
public class GlobaleException {

    @ExceptionHandler(Exception.class)
    public Result<String> exception(Exception e) {
        return  new Result<>(500,e.getMessage(),false);
    }
}
